Skip to content

[MEX-961] code quality improvements#1757

Merged
claudiulataretu merged 14 commits intofeat/state-rpcfrom
MEX-961-fixes-after-testing
Apr 6, 2026
Merged

[MEX-961] code quality improvements#1757
claudiulataretu merged 14 commits intofeat/state-rpcfrom
MEX-961-fixes-after-testing

Conversation

@claudiulataretu
Copy link
Copy Markdown
Collaborator

@claudiulataretu claudiulataretu commented Apr 6, 2026

Reasoning

  • missing unit tests for state rpc microservice
  • small fixes on compute services
  • state cron jobs started before state-rpc was initialized
  • token price compute in bulk service missed the common tokens check

Proposed Changes

  • Added more unit tests for state-rpc microservice covering all handlers and computes
  • Added common tokens check in bulk service token compute
  • Added a initialized rpc method for state-rpc to check it's state before executing cron jobs
  • small fixes on staking compute service and fees collector missing week compute in state-rpc

How to test

  • All unit tests should pass

Signed-off-by: Claudiu Lataretu <claudiu.lataretu@gmail.com>
Signed-off-by: Claudiu Lataretu <claudiu.lataretu@gmail.com>
…pecs

Signed-off-by: Claudiu Lataretu <claudiu.lataretu@gmail.com>
Signed-off-by: Claudiu Lataretu <claudiu.lataretu@gmail.com>
…king, fees-collector, timekeeping)

Signed-off-by: Claudiu Lataretu <claudiu.lataretu@gmail.com>
Signed-off-by: Claudiu Lataretu <claudiu.lataretu@gmail.com>
Signed-off-by: Claudiu Lataretu <claudiu.lataretu@gmail.com>
Signed-off-by: Claudiu Lataretu <claudiu.lataretu@gmail.com>
Signed-off-by: Claudiu Lataretu <claudiu.lataretu@gmail.com>
- check for state rpc readiness before executing cron jobs fron state cron

Signed-off-by: Claudiu Lataretu <claudiu.lataretu@gmail.com>
Signed-off-by: Claudiu Lataretu <claudiu.lataretu@gmail.com>
Signed-off-by: Claudiu Lataretu <claudiu.lataretu@gmail.com>
Signed-off-by: Claudiu Lataretu <claudiu.lataretu@gmail.com>
Signed-off-by: Claudiu Lataretu <claudiu.lataretu@gmail.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 6, 2026

Codecov Report

❌ Patch coverage is 92.36641% with 20 lines in your changes missing coverage. Please review.
✅ Project coverage is 56.08%. Comparing base (c664ac9) to head (7bd5735).
⚠️ Report is 16 commits behind head on feat/state-rpc.

Files with missing lines Patch % Lines
src/modules/state/services/state.sync.service.ts 0.00% 14 Missing ⚠️
...services/compute/fees-collector.compute.service.ts 33.33% 2 Missing ⚠️
...odules/staking/services/staking.compute.service.ts 0.00% 2 Missing ⚠️
src/modules/state/services/state.service.ts 33.33% 2 Missing ⚠️
Additional details and impacted files
@@                Coverage Diff                 @@
##           feat/state-rpc    #1757      +/-   ##
==================================================
+ Coverage           54.44%   56.08%   +1.63%     
==================================================
  Files                 304      334      +30     
  Lines               14567    16627    +2060     
  Branches             1928     2403     +475     
==================================================
+ Hits                 7931     9325    +1394     
- Misses               6630     7296     +666     
  Partials                6        6              
Flag Coverage Δ
unittests 56.08% <92.36%> (+1.63%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@claudiulataretu claudiulataretu merged commit 980c827 into feat/state-rpc Apr 6, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants